package com.ms.service.module.fish.message.server;

import java.nio.ByteBuffer;

import com.ms.service.module.fish.game.GameUser;
import com.ms.service.module.fish.message.FishBaseMessage;

/**
 * 切换炮台
 * @author cuiwm
 */
public class ChangeRateMessage extends FishBaseMessage {
	
    private GameUser user;
    
    public ChangeRateMessage(GameUser user) {
    	this.setUser(user);
	}

	public GameUser getUser() {
		return user;
	}

	public void setUser(GameUser user) {
		this.user = user;
	}

	@Override
	public void writeBody(ByteBuffer buf) {
		writeString(buf, user.getId().toString());
		buf.putInt(user.getBatteryRate());
	}


}